/**
 * 
 */
package me.myachievements.web.goal;

import org.apache.wicket.markup.html.basic.Label;

import me.myachievements.persistence.goal.Goal;

import me.myachievements.web.PersistentObjectModel;
import me.myachievements.web.restricted.goal.GoalManagerPage;

/**
 * @author besseym
 *
 */
public class UpdateGoalForm extends GoalForm {

	/**
	 * Constructor
	 * @param id
	 * @param goal
	 */
	public UpdateGoalForm(String id, Goal goal) {
		super(id, "Update Goal", new PersistentObjectModel<Goal>(goal));
	}
	
	/*
	 * (non-Javadoc)
	 * @see org.apache.wicket.markup.html.form.Form#onSubmit()
	 */
	@Override
	protected void onSubmit(){
		this.goalPersistenceManager.update(this.getModelObject());
	}

}
